Skip to content

feat: Add progress bar and pretty print for CLI - #261

Merged
Pringled merged 7 commits into
mainfrom
add-cli-pretty-and-progress
Sep 11, 2026
Merged

feat: Add progress bar and pretty print for CLI#261
Pringled merged 7 commits into
mainfrom
add-cli-pretty-and-progress

Conversation

@Pringled

@Pringled Pringled commented Sep 5, 2026

Copy link
Copy Markdown
Member

This PR adds a progressbar to the CLI for indexing to make it more visible how long indexing will take. The progressbar disappears after indexing finishes (we could keep it though? Idk). Also added a --format argument to make the CLI output nice to read (mainly for demo purposes for a cool followup), which can be json (default) or text. We already had tqdm as a transitive dep, now it's just added since we import it directly.

Screenshot:
image

- semble search/find-related gain --pretty, printing human-readable
  "path:start-end" + code per result instead of raw JSON. Default
  JSON output (used by agents/MCP) is unchanged.
- create_index_from_path takes an optional on_progress(files_done,
  files_total) callback, threaded through SembleIndex.from_path/
  from_git. The CLI wires it to a tqdm bar (green, matching the
  installer checkmarks and `semble savings` bars) that only appears
  on a tty and only when there's actually indexing work to do — a
  cache hit shows nothing.

Claude-Session: https://claude.ai/code/session_013GB3H6NiUFKsyAVC3aQNZf
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/cli.py 100.00% <100.00%> (ø)
src/semble/index/create.py 100.00% <100.00%> (ø)
src/semble/index/index.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge with no outstanding blocking findings.

The changes since the previous review consistently replace the provisional --pretty interface with --format text and preserve the default JSON behavior. The eager traversal thread was manually resolved without explanation.

Reviews (2): Last reviewed commit: "Rename to --format" | Re-trigger Greptile

Comment thread src/semble/cli.py Outdated
Comment thread src/semble/index/create.py
@Pringled
Pringled requested a review from stephantul September 7, 2026 07:19
@Pringled
Pringled merged commit b5cdcf0 into main Sep 11, 2026
17 checks passed
@Pringled
Pringled deleted the add-cli-pretty-and-progress branch September 11, 2026 06:12
Pringled added a commit that referenced this pull request Sep 11, 2026
Take main's --format/show_progress_bar implementation from #261 over this
branch's --pretty/on_progress version, switch the VHS tapes to
--format text, regenerate the demo GIFs, and relock uv.lock against the
1-week exclude-newer span.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
Pringled added a commit that referenced this pull request Sep 11, 2026
Resolve cli.py against #261: keep --format/_print_results from main and
the multi-path search, repos map, and per-repo index caching from this
branch.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants